<?php
// {"key":"value", "key1":"value1"}
$data = [
    'username' => 'zhangsan',
    'age' => 30
];

echo json_encode($data); // 将数组转换成json格式的字符串，json_decode()
